/*
 * Поразрядная сортировка
 */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <assert.h>
#include <limits.h>
#include <ctype.h>
#include <stdint.h>

long long *
Radix_sort_inter(const long long *data, long long *result, const int n, const int shift)
{
	static int index[0x10];
	register int i, t1, t2;
#define IndexVal ((data[i] >> (shift<<2)) & 0xF)

	memset(index, 0, sizeof index);

	for (i = 0; i < n; i++)
		index[IndexVal]++; /* :) */

	for (t2 = t1 = i = 0; i < 0x10; ++i) {
		t1 = index[i];
		index[i] = t2;
		t2 += t1;
	}

	for (i = 0; i < n; i++)
		result[index[IndexVal]++] = data[i]; /* :( */

	return result;
#undef IndexVal
}

int
Radix_sort(long long *data, const int n)
{
	int shift;
	long long *buf;

	buf = calloc((size_t) n, sizeof *buf);
	for (shift = 0; shift < (sizeof *data * CHAR_BIT) / 4; shift++) {
		Radix_sort_inter(data, buf, n, shift);
		memcpy(data, buf, sizeof *data * n);
	}
	free(buf);

	return 0;
}

int
main(int argc, char **argv)
{
	int n;
	long long *data;
	register int i = 0;

	scanf("%d", &n);
	data = calloc((size_t) n, sizeof *data);

	for (i = 0; i < n; i++) {
		scanf("%lld", &data[i]);
		data[i] += (long long) INT_MAX + 1LL;
	}

	Radix_sort(data, n);

	for (i = 0; i < n; i++)
		printf("%lld ", data[i] - INT_MAX - 1);
	fputc('\n', stdout);
	free(data);
	return 0;
}
